The present invention relates to an anti-aliasing method using a partitioned look-up table (LUT), and more particularly, to a method by which the size of the LUT used in obtaining a mask for sub-pixels is reduced to one-sixteenth of the conventional size.
In computer graphics systems, a stepped edge of an object polygon may often be generated by the digitization of an on-screen image. The removal of such a phenomenon is called anti-aliasing.
Anti-aliasing is classified into a super-sampling method and an area sampling method. In the super-sampling method, the color value of a pixel is calculated by obtaining the color values of several sub-pixels within the pixel and averaging the thus-obtained color values. In area sampling, the area of the polygon occupying a pixel is calculated and then the color value of the area ratio is calculated.
In the case of performing anti-aliasing via hardware, the super-sampling method is widely adopted due to the ease of its implementation. However, the Schilling scheme, in which area sampling is supplemented, has been proposed to solve the drawbacks of super-sampling.
In the Schilling scheme, the distance from the center of a pixel to the edge of a polygon, and the slope of the edge are input to an LUT, and the sub-pixel mask generated for that case is obtained from an LUT. Thereafter, a color value in a corresponding frame buffer and a Z value are updated with respect to the sub-pixels which are set to "1."
The sub-pixels are numbered correspondingly to the area covered by a polygon and stored in tie LUT as a sub-pixel mask having the most similar shape of the polygon within a pixel, based on the above distance and slope. Here, the distance from the center of the respective pixel to the edge of the polygon is obtained by interpolating an edge function (see "A New Simple and Efficient Antialiasing with Subpixel Masks" by Andreas Schilling, Computer Graphics, Volume 25, Number 4, July 1991, pp 133-141).
FIG. 1A shows screen units and the edge of a polygon used in the present invention. Tile screen units shown in FIG. 1A are pixel 100 and sub-pixels 102. In the present invention, it is assumed that a pixel is composed of 4.times.4 sub-pixels.
FIG. 1A also shows the distance (d) from the center of pixel 100 to a straight line of the polygon's edge, and the slope (s) of the straight line with respect to the X axis. An LUT is constituted using these two variables, thereby producing a sub-pixel mask for generating a desired screen display.
Referring to FIG. 1B which is a schematic block diagram of the conventional LUT for generating a pixel mask, the inputs of LUT 104 are d, d.sub.ex and the sign of d.sub.ey. Here, d.sub.ex is a variable representing the distance from the center of a pixel to the straight line of the polygon's edge, which depends on the increment of the X axis. Since the magnitude of d.sub.ex is proportionate to the slope of a straight line of the polygon's edge, the d.sub.ex functions as a slope value. The sign of d.sub.ey determines whether a pixel location will fall inside or outside the polygon. In other words, a positive d.sub.ey value means that the pixel lies in the positive direction from the straight line and a negative d.sub.ey value means that the pixel lies in the negative direction from the straight line, with respect to the Y axis.
Therefore, LUT 104 selects a mask corresponding to three input variables and outputs the selected mask, to thereby display the mask on a screen as shown in FIG. 1C.
The anti-aliasing method of Schilling requires a 32K-bit LUT memory, supposing one pixel is composed of 4.times.4 sub-pixels. In order to process at high speed, the LUTs should be incorporated in a rasterizer chip. However, it is costly to incorporate such large-capacity memories into an application-specific integrated circuit (ASIC).